package cn.tl.base.mapper;

import cn.tl.base.query.BaseQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface BaseMapper<T> {
    //查询所有
    List<T> findAll();
    //根据id查询
    T findById(Long id);
    //新增
    void save(T t);
    //修改
    void update(T t);
    //删除
    void delete(Long id);
    //分页查询
    Long count(BaseQuery query);
    List<T> data(BaseQuery query);
}
